﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;

namespace WindowsPhone7ActionPack.Sandbox
{
    public partial class MainPage : PhoneApplicationPage
    {
        public MainPage()
        {
            InitializeComponent();
            this.OrientationChanging += new EventHandler<OrientationChangedEventArgs>(MainPage_OrientationChanging);
            this.OrientationChanged += new EventHandler<OrientationChangedEventArgs>(MainPage_OrientationChanged);
            SupportedOrientations = SupportedPageOrientation.Portrait | SupportedPageOrientation.Landscape;
        }

        void MainPage_OrientationChanged(object sender, OrientationChangedEventArgs e)
        {
            //this.WalkUpTreeTillType<PhoneApplicationPage>().OrientationChanged+=new EventHandler<OrientationChangedEventArgs>(MainPage_OrientationChanged);
        }

        void MainPage_OrientationChanging(object sender, OrientationChangedEventArgs e)
        {
            //map.Center = new Microsoft.Maps.MapControl.Location();
            
        }
    }
}